#include "ExtSlice.h"
#include "IVisitor.h"

ExtSlice::ExtSlice(const SliceTypeList& dims, int nodeId):
    sliceType(nodeId),
    _dims(dims)
{
}
    
ExtSlice::~ExtSlice()
{
    _dims.clear();
}
    
Ast::AstTypes ExtSlice::type() const
{
    return Ast::ExtSlice;
}
    

SliceTypeList ExtSlice::dims()
{
    return _dims;
}

void ExtSlice::setDims(const SliceTypeList& dims)
{
    _dims = dims;
}

    
QString ExtSlice::toString() const
{
    return QString("ExtSlice[dims=%1]").
                arg(_dims.toString());
}
    
void ExtSlice::accept(IVisitor* visitor, const SimpleNodePtr& node)
{
    visitor->visitExtSlice(node.dynamicCast<ExtSlice>());
}
    
void ExtSlice::traverse(IVisitor* visitor)
{
    _dims.traverse(visitor);
}